##############################################################
## MOD Title:   Upgrade Visual Confirmation to Advanced Visual
##		Confirmation for Cricca Guestbook
## MOD Author:  SemiX < michalski@teleos-web.de >
## MOD Version:	1.0.0
##
## Installation Level:  easy
## Installation Time:	2 Minutes
##
## Files To Edit:  guestbook.php
##      	   includes/usercp_confirm.php
##############################################################
## HINT: "Visual Confirmation for Cricca Guestbook" v1.0.2 and
##	 "Advanced Visual Confirmation" v1.1.0 need to be installed!!
##############################################################
#
#-----[ OPEN ]------------------------------------------------
#
guestbook.php
#
#-----[ FIND ]------------------------------------------------
#
		$confirm_image = (@extension_loaded('zlib')) ? '<img src="' . append_sid("guestbook.$phpEx?mode=confirm&amp;id=$confirm_id") . '" alt="" title="" />' : '<img src="' . append_sid("guestbook.$phpEx?mode=confirm&amp;id=$confirm_id&amp;c=1") . '" alt="" title="" /><img src="' . append_sid("guestbook.$phpEx?mode=confirm&amp;id=$confirm_id&amp;c=2") . '" alt="" title="" /><img src="' . append_sid("guestbook.$phpEx?mode=confirm&amp;id=$confirm_id&amp;c=3") . '" alt="" title="" /><img src="' . append_sid("guestbook.$phpEx?mode=confirm&amp;id=$confirm_id&amp;c=4") . '" alt="" title="" /><img src="' . append_sid("guestbook.$phpEx?mode=confirm&amp;id=$confirm_id&amp;c=5") . '" alt="" title="" /><img src="' . append_sid("guestbook.$phpEx?mode=confirm&amp;id=$confirm_id&amp;c=6") . '" alt="" title="" />';
#
#-----[ REPLACE WITH ]----------------------------------------
#
		$confirm_image = '<img src="' . append_sid("guestbook.$phpEx?mode=confirm&amp;id=$confirm_id") . '" alt="" title="" />';
#
#-----[ OPEN ]------------------------------------------------
#
# This file is replaced by the Advanced Visual Confirmation MOD,
# so we have to edit it again. Remember this, if you replace it
# again with further AVC-Updates! If you ran "Update VC v1.0.1 to
# v1.0.2" before, while the AVC-MOD was already installed on
# your phpBB, you can probably skip this passage...
#
includes/usercp_confirm.php
#
#-----[ FIND ]------------------------------------------------
#
$sql = 'SELECT code  
	FROM ' . CONFIRM_TABLE . " 
	WHERE session_id = '" . $userdata['session_id'] . "' 
		AND confirm_id = '$confirm_id'";
#
#-----[ REPLACE WITH ]----------------------------------------
#
//-- mod : visual confirmation for cricca guestbook ------------------------------------------------
//-- remove
// $sql = 'SELECT code  
//  FROM ' . CONFIRM_TABLE . " 
//  WHERE session_id = '" . $userdata['session_id'] . "' 
//	  AND confirm_id = '$confirm_id'";
//-- add
  $table_name = ( $activate_cricca_guestbook ) ? GUESTBOOK_CONFIRM_TABLE : CONFIRM_TABLE;
  $sql = 'SELECT code  
  	FROM ' . $table_name . " 
  	WHERE session_id = '" . $userdata['session_id'] . "' 
    		AND confirm_id = '$confirm_id'";
//-- fin mod : visual confirmation for cricca guestbook --------------------------------------------
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#
# EoM